using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;

namespace KPIS.GERP.Models.HRM
{
    [DataContract]
	[Table("hrm_mp_position_work_on_duty")]
    public class MpPositionWorkOnDuty
    {
        public MpPositionWorkOnDuty()
        {
            RecordStatus = "W";
        }

		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Column("wod_seq")]
        public int WodId { get; set; }

		[DataMember, Column("ref_no")]
        public string Code { get; set; }

		[DataMember, Column("to_pos_seq"), ForeignKey("ToPosition")]
        public int? ToPosSeq { get; set; }

		[DataMember, Column("by_emp_seq"), ForeignKey("ByEmployee")]
        public int? ByEmpSeq { get; set; }

		[DataMember, Column("start_date")]
        public DateTime StartDate { get; set; }

		[DataMember, Column("end_date")]
        public DateTime EndDate { get; set; }

		[DataMember, Column("see_old_message")]
        public bool SeeOldMessage { get; set; }

		[DataMember, Column("description")]
        public string Description { get; set; }

		[DataMember, Column("record_status")]
        public string RecordStatus { get; set; }
        
		[DataMember, Column("created_by")]
        public int CreatedBy { get; set; }
        
		[DataMember, Column("created_when")]
        public System.DateTime? CreatedWhen { get; set; }
        
		[DataMember, Column("updated_by")]
        public Nullable<int> UpdatedBy { get; set; }
        
		[DataMember, Column("updated_when")]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }
        
		[DataMember]
        public virtual Position ToPosition { get; set; }
        
		[DataMember]
        public virtual Employee ByEmployee { get; set; }
    }
}